home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Herois / Codigo.Cst / 00133_Midias- BarraScroll.ls < prev    next >
Encoding:
Text File  |  1999-03-19  |  934 b   |  35 lines

  1. on mouseDown me
  2.   -- Constantes iniciais
  3.   set spr = the spriteNum of me
  4.   set sprIndicador = 84
  5.   set posCima = 15
  6.   set posBaixo = 73
  7.   set tmp = the timer - 12
  8.   set primeiro = true
  9.   
  10.   repeat while the mouseDown
  11.     if the timer > tmp - 12 then
  12.       set tmp = the timer
  13.       if the mouseV < the locV of sprite spr + posCima then
  14.         -- Scroll cima
  15.         midiaScroll -1
  16.       else if the mouseV > the locV of sprite spr + posBaixo then
  17.         -- Scroll baixo
  18.         midiaScroll +1
  19.       else if the mouseV < the locV of sprite sprIndicador then
  20.         -- Scroll pagina cima
  21.         midiaScroll -6
  22.         set tmp = tmp + 12
  23.       else if the mouseV > the locV of sprite sprIndicador then
  24.         -- Scroll pagina baixo
  25.         midiaScroll +6
  26.         set tmp = tmp + 12
  27.       end if
  28.       updateStage
  29.       if primeiro then
  30.         set primeiro = false
  31.         set tmp = tmp + 60
  32.       end if
  33.     end if
  34.   end repeat
  35. end